package com.bd.learning.autocreateid.tinyid;

import cn.hutool.core.date.DateUtil;
import cn.hutool.core.date.TimeInterval;
import cn.hutool.core.thread.GlobalThreadPool;
import cn.hutool.log.Log;
import cn.hutool.log.LogFactory;
//import com.xiaoju.uemc.tinyid.client.utils.TinyId;

public class T1 {

    private static final Log log = LogFactory.get();

    public static void main(String[] args) {
        TimeInterval timer = DateUtil.timer();
        timer.start("main");
        int cnt = 100000;
        // Long id = TinyId.nextId("test_odd");
        // for (int i = 0; i < cnt; i += 1000) {
        // TinyId.nextId("test_odd", 1000);
        // }
        // List<Long> ids = TinyId.nextId("test_odd", 100);

//        for (int i = 0; i < cnt; i++) {
//            TinyId.nextId("test_odd");
//        }
//
//        log.info(" total records={} , time = {} ms , id = {}", cnt, timer.interval(), TinyId.nextId("test_odd"));

        // GlobalThreadPool.shutdown(false);

    }

}
